package com.elm.orderDetailet.service.impl;

import com.elm.orderDetailet.mapper.OrderDetailetMapper;
import com.elm.orderDetailet.pojo.OrderDetailet;
import com.elm.orderDetailet.service.OrderDetailetService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class OrderDetailetServiceImpl implements OrderDetailetService {
    @Autowired
    private OrderDetailetMapper orderDetailetMapper;

    @Override
    public void orderDetailetCreate(OrderDetailet orderDetailet) {
        orderDetailetMapper.saveOrderDetailet(orderDetailet);
    }

    @Override
    public List<OrderDetailet> getByOrderId(Integer orderId) {
        return orderDetailetMapper.getByOrderId(orderId);
    }
}
